package com.lvmama.pangolin.tn.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lvmama.pangolin.entity.spider.TicketCommodity;
import com.lvmama.pangolin.entity.tn.TNTicket_CommodityDetail;
import com.lvmama.pangolin.mybatis.mapper.tn.TNTicketCommodityDetailMapper;
import com.lvmama.pangolin.tn.service.TNTicketCommodityDetailService;
@Transactional
@Service
public class TNTicketCommodityDetailServiceImpl implements TNTicketCommodityDetailService{
	/**  
	* @Title：TCTicketCommodityDetailServiceImpl.java
	* @Author:zhoutianqi
	* @Description:
	* @Date：2017年2月17日上午11:19:51  
	*/
	@Autowired
	private TNTicketCommodityDetailMapper tnTicketCommodityDetailMapper;
	@Override
	public List<TNTicket_CommodityDetail> getTNTicket_CommodityDetailListByID(Map<String, Object> map)
			throws Exception {
		return tnTicketCommodityDetailMapper.getTNTicket_CommodityDetailListByID(map);
	}
	public int insertCommodityDetailLog(TNTicket_CommodityDetail detail)throws Exception{
		return tnTicketCommodityDetailMapper.insertCommodityDetailLog(detail);
	}
	public List<TNTicket_CommodityDetail> selectAllLog(){
		List<TNTicket_CommodityDetail> list = null;
		try {
			list = tnTicketCommodityDetailMapper.selectAllLog();
		} catch (Exception e) {
			// TODO: handle exception
		}
		return list;
	}
	public List<TNTicket_CommodityDetail> queryLogByMap(Map<String,Object> map){
		List<TNTicket_CommodityDetail> list = null;
		try {
			list = tnTicketCommodityDetailMapper.queryLogByMap(map);
		} catch (Exception e) {
			// TODO: handle exception
		}
		return list;
	}
	public int deleteLogByMap(Map<String,Object> map){
		int result = 0;
		try {
			result = tnTicketCommodityDetailMapper.deleteLogByMap(map);
		} catch (Exception e) {
			// TODO: handle exception
		}
		return result;
	}
	public int updateLog(TNTicket_CommodityDetail detail){
		return tnTicketCommodityDetailMapper.updateLog(detail);
	}
	public int deleteLogByID(String detail_id){
		return tnTicketCommodityDetailMapper.deleteLogByID(detail_id);
	}
	@Override
	public int insert(TicketCommodity record)
	{
		return tnTicketCommodityDetailMapper.insert(record);
	}
	@Override
	public int insertSelective(TicketCommodity record)
	{
		return tnTicketCommodityDetailMapper.insertSelective(record);
	}
	@Override
	public List<TNTicket_CommodityDetail> getTNTicket_CommodityDetailLogListByID(Map<String, Object> map) throws Exception {
		// TODO Auto-generated method stub
		return tnTicketCommodityDetailMapper.getTNTicket_CommodityDetailLogListByID(map);
	}
	@Override
	public int deleteByTaskAndProd(TicketCommodity record)
	{
		return tnTicketCommodityDetailMapper.deleteByTaskAndProd(record);
	}
	
	
}
